var ClIP = 'http://t66y.com';
var site = getStorage('site');

if("undefined" != typeof site){
	ClIP = site;
}

var OpenAPI = {
	"forum_list": ClIP + "/thread0806.php?fid=",
	"read":  ClIP + "/read.php?toread=1&tid=",
	"post":  ClIP + "/post.php?",
	"login":  ClIP + "/login.php?",
	"logout":  ClIP + "/login.php?action=quit",
};


function getStorage(key){
    var ls = uzStorage();
    if(ls){
        var v = ls.getItem(key);
        if(!v){return;}
        if(v.indexOf('obj-') === 0){
            v = v.slice(4);
            return JSON.parse(v);
        }else if(v.indexOf('str-') === 0){
            return v.slice(4);
        }
    }
}

function uzStorage(){
	var isAndroid = (/android/gi).test(navigator.appVersion);
    var ls = window.localStorage;
    if(isAndroid){
       ls = os.localStorage();
    }
    return ls;
}
